﻿<Window x:Class="WpfFizzBuzz.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:JasLib_Wpf="clr-namespace:JasLib.Wpf;assembly=JasLib"
        Title="MainWindow" Height="435" Width="431"
        TextOptions.TextRenderingMode="ClearType"
        TextOptions.TextFormattingMode="Display">
	<Grid>
		<JasLib_Wpf:AnchoringCanvas>
			<ListBox ItemsSource="{Binding Factors}" VirtualizingStackPanel.IsVirtualizing="True" Height="103" Width="280" Canvas.Left="40" Canvas.Top="84">
				<ListBox.ItemTemplate>
					<DataTemplate>
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto" />
								<ColumnDefinition Width="Auto" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
							<TextBox Grid.Column="0" Text="{Binding Path=Name}"/>
							<TextBox Grid.Column="1" Text="{Binding Path=Factor}"/>
							<TextBlock Grid.Column="2" Text="{Binding Path=MatchCount}"/>
						</Grid>
					</DataTemplate>
				</ListBox.ItemTemplate>
	        	      
			</ListBox>

			<ListBox ItemsSource="{Binding Multiples}" VirtualizingStackPanel.IsVirtualizing="True" Height="138" Width="314" Canvas.Left="40" Canvas.Top="241">
				<ListBox.ItemTemplate>
					<DataTemplate>
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
							<Label Grid.Column="0" Content="{Binding Name}"/>
							<Label Grid.Column="1" Content="{Binding Multiple}"/>
						</Grid>
					</DataTemplate>
				</ListBox.ItemTemplate>
            
			</ListBox>
			<Button Content="Start" Canvas.Left="40" Canvas.Top="216" Width="75" Command="{Binding Path=StartFindMultiplesCommand}"/>
			<Button Content="Add Factor" Canvas.Left="333" Canvas.Top="100" Width="75"/>
			<TextBox Canvas.Left="109" TextWrapping="Wrap" Canvas.Top="30" Width="67" Text="{Binding Path=RangeMinimum}"/>
			<Label Content="Minimum:" Canvas.Left="39" Canvas.Top="28"/>
			<TextBox Canvas.Left="261" TextWrapping="Wrap" Canvas.Top="30" Width="67" Text="{Binding Path=RangeMaximum}"/>
			<Label Content="Maximum:" Canvas.Left="191" Canvas.Top="28"/>
		</JasLib_Wpf:AnchoringCanvas>
	</Grid>
</Window>
